﻿<!--
Author : K.F.Storm
Email : yk000123 at sina.com
Website : http://www.kfstorm.com	
-->
<local:ChildWindowBase x:Class="DoubanFM.ShareSettingWindow"
		xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:local="clr-namespace:DoubanFM"
		xmlns:core="clr-namespace:DoubanFM.Core;assembly=DoubanFM.Core"
        xmlns:resx="clr-namespace:DoubanFM.Resources"
		x:Name="Window"
		Title="{x:Static resx:Resources.ShareSettingsButton}" Background="#FF813131">
	<local:ChildWindowBase.Resources>
		<local:ShareSitesToStringConverter x:Key="ShareSitesToStringConverter"/>
	</local:ChildWindowBase.Resources>
	<Grid Width="300"  Margin="10">
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto"/>
			<RowDefinition/>
			<RowDefinition Height="10"/>
			<RowDefinition Height="Auto"/>
			<RowDefinition Height="Auto"/>
			<RowDefinition/>
		</Grid.RowDefinitions>
        <Label Content="{x:Static resx:Resources.ShareSettingsWindowShareButtonLabel}"/>
		<ListBox x:Name="LbDisplayedSites" Grid.Row="1" Style="{StaticResource CheckableListBoxStyle}">
			<ListBox.ItemsPanel>
				<ItemsPanelTemplate>
					<UniformGrid Columns="2"/>
				</ItemsPanelTemplate>
			</ListBox.ItemsPanel>
			<ListBox.ItemTemplate>
				<DataTemplate DataType="{x:Type core:Share+Sites}">
					<TextBlock Text="{Binding Converter={StaticResource ShareSitesToStringConverter}}"/>
				</DataTemplate>
			</ListBox.ItemTemplate>
		</ListBox>
        <CheckBox Grid.Row="3" IsChecked="{Binding Path=ShareSetting.EnableOneKeyShare, ElementName=Window}" Content="{x:Static resx:Resources.ShareSettingsWindowEnableKeyShareCb}"/>
        <Label Grid.Row="4" Content="{x:Static resx:Resources.ShareSettingsWindowKeyShareSiteLabel}"/>
		<ListBox x:Name="LbOneKeyShareSites" Grid.Row="5" Style="{DynamicResource CheckableListBoxStyle}">
			<ListBox.ItemsPanel>
				<ItemsPanelTemplate>
					<UniformGrid Columns="2"/>
				</ItemsPanelTemplate>
			</ListBox.ItemsPanel>
			<ListBox.ItemTemplate>
				<DataTemplate DataType="{x:Type core:Share+Sites}">
					<TextBlock Text="{Binding Converter={StaticResource ShareSitesToStringConverter}}"/>
				</DataTemplate>
			</ListBox.ItemTemplate>
		</ListBox>
	</Grid>
</local:ChildWindowBase>
